<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
// Route::middleware('auth:api')->get('/user', function (Request $request) {
//     return $request->user();
// });
Route::get('alidata/getlocation', 'Api\AlidataController@getLocation');
Route::get('alidata/getrisk', 'Api\AlidataController@getRisk');
Route::get('alidata/getcompany', 'Api\AlidataController@getCompany');
Route::get('alidata/getmonth', 'Api\AlidataController@getMonth');
Route::get('alidata/getpost', 'Api\AlidataController@getPost');
Route::post('alidata/getpost', 'Api\AlidataController@getPost');

Route::post('login', 'Api\LoginController@login');


Route::group(['middleware' => 'auth:api'], function() {
    Route::post('company/search', 'Api\CompanyController@search');
    Route::post('company/create', 'Api\CompanyController@create');

    Route::post('check/create', 'Api\ComcheckController@create');
    Route::post('check/getChecknegative', 'Api\ComcheckController@getChecknegative');
    Route::post('check/getCheckaccord', 'Api\ComcheckController@getCheckaccord');
    Route::post('check/choose', 'Api\ComcheckController@choose');
    Route::post('check/show', 'Api\ComcheckController@show');
    Route::post('check/inconform', 'Api\ComcheckController@inconform');
    Route::post('upload/uploadimg','Api\UploadController@uploadImg');
    Route::post('check/inconformdel', 'Api\ComcheckController@inconformdel');
    Route::post('check/exportWord1', 'Api\ComcheckController@exportWord1');

//初查
    Route::post('ninesmall/firetype', 'Api\NinesmallController@firetype');
    Route::post('ninesmall/choose', 'Api\NinesmallController@choose');
    Route::post('exportproject', 'Api\NinesmallController@export');
    Route::post('ninecheck/choose', 'Api\NinecheckController@choose');
    Route::post('ninecheck/show', 'Api\NinecheckController@show');
    Route::post('ninecheck/update', 'Api\NinecheckController@update');
    Route::post('ninecheck/updatepost', 'Api\NinecheckController@updatepost');
    Route::post('ninecheck/showelse', 'Api\NinecheckController@showelse');
    Route::post('ninecheck/create', 'Api\NinecheckController@create');
    Route::post('ninecheck/createelse', 'Api\NinecheckController@createelse');
    Route::post('ninecheck/downloadwords', 'Api\NinecheckController@downloadwords');
    Route::post('ninecheck/finish', 'Api\NinecheckController@finish');
    Route::post('ninecheck/signature', 'Api\NinecheckController@signature');
    Route::post('check/getChecknegative', 'Api\ComcheckController@getChecknegative');
    Route::post('check/getCheckaccord', 'Api\ComcheckController@getCheckaccord');
    Route::post('today_statistics', 'Api\StatisticsController@TodayStatistics');
    Route::post('area_statistics', 'Api\StatisticsController@areaStatistics');
    Route::post('getprovince', 'Api\StatisticsController@getProvince');
    Route::post('getregion', 'Api\StatisticsController@getRegion');
    Route::post('export', 'Api\StatisticsController@export');
    Route::post('exportlist', 'Api\StatisticsController@exportlist');
    //项目
    Route::post('project', 'Api\ProjectController@index');
    Route::post('one', 'Api\ProjectController@one');
    Route::post('/project/update', 'Api\ProjectController@update');
    Route::post('/project/delete', 'Api\ProjectController@delete');
    Route::post('/project/company', 'Api\ProjectController@company');
    Route::post('/ninesmall/project_statistics', 'Api\NinesmallController@ProjectStatistics');
    //    Route::get('smallplace/downword/{companyId}', 'Home\SmallplacecheckController@downWord')->name('smallplace_downword');
    //    Route::get('project/company/{projectId}', 'Home\ProjectController@company')->name('project_company');
    //隐患整改
    Route::post('danger/dangercheck', 'Api\DangerController@dangercheck');
    Route::post('danger/danger_save', 'Api\DangerController@checkDangerSave');
    Route::post('ninesmall/companyone', 'Api\NinesmallController@companyone');

    /*九小场所路由接口*/
    Route::post('scompany/create', 'Api\SmallplaceController@create');
    Route::post('scompany/update', 'Api\SmallplaceController@update');
    Route::get('scompany/getCompany', 'Api\SmallplaceController@getCompany');
    Route::get('scompany/getCompanyList', 'Api\SmallplacecheckController@getCompanyList');
    Route::get('scompany/getCheckAgain', 'Api\SmallplacecheckController@checkAgain');
    Route::post('scompany/checkAgainSave', 'Api\SmallplacecheckController@checkAgainSave');
    Route::get('scompany/getWords', 'Api\SmallplacecheckController@getWords');
    Route::get('logout', 'Api\LoginController@logout');
    Route::post('resetPassword', 'Api\UserController@resetPassword');

});